

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>pymatgen.alchemy package &mdash; pymatgen 2025.6.14 documentation</title>
      <link rel="stylesheet" type="text/css" href="assets/pygments.css?v=03e43079" />
      <link rel="stylesheet" type="text/css" href="assets/css/theme.css?v=e59714d7" />
      <link rel="stylesheet" type="text/css" href="assets/css/custom.css" />

  
    <link rel="canonical" href="https://pymatgen.orgpymatgen.alchemy.html"/>
      <script src="assets/jquery.js?v=5d32c60e"></script>
      <script src="assets/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
      <script src="assets/documentation_options.js?v=03bec786"></script>
      <script src="assets/doctools.js?v=9bcbadda"></script>
      <script src="assets/sphinx_highlight.js?v=dc90522c"></script>
    <script src="assets/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >

          
          
          <a href="index.html">
            
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">pymatgen.alchemy package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pymatgen.alchemy.filters">pymatgen.alchemy.filters module</a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter"><code class="docutils literal notranslate"><span class="pre">AbstractStructureFilter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter.test"><code class="docutils literal notranslate"><span class="pre">AbstractStructureFilter.test()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.ChargeBalanceFilter"><code class="docutils literal notranslate"><span class="pre">ChargeBalanceFilter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.ChargeBalanceFilter.test"><code class="docutils literal notranslate"><span class="pre">ChargeBalanceFilter.test()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.ContainsSpecieFilter"><code class="docutils literal notranslate"><span class="pre">ContainsSpecieFilter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.as_dict"><code class="docutils literal notranslate"><span class="pre">ContainsSpecieFilter.as_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.from_dict"><code class="docutils literal notranslate"><span class="pre">ContainsSpecieFilter.from_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.test"><code class="docutils literal notranslate"><span class="pre">ContainsSpecieFilter.test()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.RemoveDuplicatesFilter"><code class="docutils literal notranslate"><span class="pre">RemoveDuplicatesFilter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.RemoveDuplicatesFilter.test"><code class="docutils literal notranslate"><span class="pre">RemoveDuplicatesFilter.test()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.RemoveExistingFilter"><code class="docutils literal notranslate"><span class="pre">RemoveExistingFilter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.RemoveExistingFilter.as_dict"><code class="docutils literal notranslate"><span class="pre">RemoveExistingFilter.as_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.RemoveExistingFilter.test"><code class="docutils literal notranslate"><span class="pre">RemoveExistingFilter.test()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.SpecieProximityFilter"><code class="docutils literal notranslate"><span class="pre">SpecieProximityFilter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.SpecieProximityFilter.as_dict"><code class="docutils literal notranslate"><span class="pre">SpecieProximityFilter.as_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.SpecieProximityFilter.from_dict"><code class="docutils literal notranslate"><span class="pre">SpecieProximityFilter.from_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.SpecieProximityFilter.test"><code class="docutils literal notranslate"><span class="pre">SpecieProximityFilter.test()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.SpeciesMaxDistFilter"><code class="docutils literal notranslate"><span class="pre">SpeciesMaxDistFilter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.filters.SpeciesMaxDistFilter.test"><code class="docutils literal notranslate"><span class="pre">SpeciesMaxDistFilter.test()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.alchemy.materials">pymatgen.alchemy.materials module</a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure"><code class="docutils literal notranslate"><span class="pre">TransformedStructure</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.append_filter"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.append_filter()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.append_transformation"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.append_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.as_dict"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.as_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.extend_transformations"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.extend_transformations()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.from_cif_str"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.from_cif_str()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.from_dict"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.from_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.from_poscar_str"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.from_poscar_str()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.from_snl"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.from_snl()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.get_vasp_input"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.get_vasp_input()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.redo_next_change"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.redo_next_change()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.set_parameter"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.set_parameter()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.structures"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.structures</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.to_snl"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.to_snl()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.undo_last_change"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.undo_last_change()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.was_modified"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.was_modified</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure.write_vasp_input"><code class="docutils literal notranslate"><span class="pre">TransformedStructure.write_vasp_input()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.alchemy.transmuters">pymatgen.alchemy.transmuters module</a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.CifTransmuter"><code class="docutils literal notranslate"><span class="pre">CifTransmuter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.CifTransmuter.from_filenames"><code class="docutils literal notranslate"><span class="pre">CifTransmuter.from_filenames()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.PoscarTransmuter"><code class="docutils literal notranslate"><span class="pre">PoscarTransmuter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.PoscarTransmuter.from_filenames"><code class="docutils literal notranslate"><span class="pre">PoscarTransmuter.from_filenames()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.transformed_structures"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.transformed_structures</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.add_tags"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.add_tags()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.append_transformation"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.append_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.append_transformed_structures"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.append_transformed_structures()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.apply_filter"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.apply_filter()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.extend_transformations"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.extend_transformations()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.from_structures"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.from_structures()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.redo_next_change"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.redo_next_change()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.set_parameter"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.set_parameter()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.undo_last_change"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.undo_last_change()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter.write_vasp_input"><code class="docutils literal notranslate"><span class="pre">StandardTransmuter.write_vasp_input()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.alchemy.transmuters.batch_write_vasp_input"><code class="docutils literal notranslate"><span class="pre">batch_write_vasp_input()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">pymatgen</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content style-external-links">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">pymatgen.alchemy package</li>
      <li class="wy-breadcrumbs-aside">
              <a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.alchemy.rst" class="fa fa-github"> Edit on GitHub</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="module-pymatgen.alchemy">
<span id="pymatgen-alchemy-package"></span><h1>pymatgen.alchemy package<a class="headerlink" href="#module-pymatgen.alchemy" title="Link to this heading"></a></h1>
<p>This package provides the modules for performing large scale transformations on
a large number of structures.</p>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
</section>
<section id="module-pymatgen.alchemy.filters">
<span id="pymatgen-alchemy-filters-module"></span><h2>pymatgen.alchemy.filters module<a class="headerlink" href="#module-pymatgen.alchemy.filters" title="Link to this heading"></a></h2>
<p>This module defines filters for Transmuter object.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.AbstractStructureFilter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AbstractStructureFilter</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L23-L37"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MSONable</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ABC</span></code></p>
<p>Structures that return True when passed to the test() method are retained during
transmutation. Those that return False are removed.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.AbstractStructureFilter.test">
<em class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.IStructure" title="pymatgen.core.structure.IStructure"><span class="pre">IStructure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L28-L37"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.AbstractStructureFilter.test" title="Link to this definition"></a></dt>
<dd><p>Structures that return true are kept in the Transmuter object during filtering.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input structure to test</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>True if structure passes filter.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.ChargeBalanceFilter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ChargeBalanceFilter</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L278-L290"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ChargeBalanceFilter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures that are not charge balanced from the
transmuter. This only works if the structure is oxidation state
decorated, as structures with only elemental sites are automatically
assumed to have net charge of 0.</p>
<p>No args required.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.ChargeBalanceFilter.test">
<span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L288-L290"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ChargeBalanceFilter.test" title="Link to this definition"></a></dt>
<dd><p>True if structure is neutral.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.ContainsSpecieFilter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ContainsSpecieFilter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">species</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">SpeciesLike</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">strict_compare</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">AND</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L40-L114"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractStructureFilter</span></code></a></p>
<p>Filter for structures containing certain elements or species.
By default compares by atomic number.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>species</strong> (<em>list</em><em>[</em><em>SpeciesLike</em><em>]</em>) – species to look for</p></li>
<li><p><strong>AND</strong> – whether all species must be present to pass (or fail) filter.</p></li>
<li><p><strong>strict_compare</strong> – if true, compares objects by specie or element
object if false, compares atomic number</p></li>
<li><p><strong>exclude</strong> – If true, returns false for any structures with the specie
(excludes them from the Transmuter).</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.ContainsSpecieFilter.as_dict">
<span class="sig-name descname"><span class="pre">as_dict</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L92-L103"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.as_dict" title="Link to this definition"></a></dt>
<dd><p>Get MSONable dict.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.ContainsSpecieFilter.from_dict">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dct</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L105-L114"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.from_dict" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>dct</strong> (<em>dict</em>) – Dict representation.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Filter</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.ContainsSpecieFilter.test">
<span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.IStructure" title="pymatgen.core.structure.IStructure"><span class="pre">IStructure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L60-L79"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.test" title="Link to this definition"></a></dt>
<dd><p>True if structure does not contain specified species.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.RemoveDuplicatesFilter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">RemoveDuplicatesFilter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure_matcher</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.analysis.html#pymatgen.analysis.structure_matcher.StructureMatcher" title="pymatgen.analysis.structure_matcher.StructureMatcher"><span class="pre">StructureMatcher</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">symprec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L166-L217"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveDuplicatesFilter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractStructureFilter</span></code></a></p>
<p>This filter removes exact duplicate structures from the transmuter.</p>
<p>Remove duplicate structures based on the structure matcher
and symmetry (if symprec is given).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure_matcher</strong> (<em>dict</em><em> | </em><a class="reference internal" href="pymatgen.analysis.html#pymatgen.analysis.structure_matcher.StructureMatcher" title="pymatgen.analysis.structure_matcher.StructureMatcher"><em>StructureMatcher</em></a><em>, </em><em>optional</em>) – Provides a structure matcher to be used for
structure comparison.</p></li>
<li><p><strong>symprec</strong> (<em>float</em><em>, </em><em>optional</em>) – The precision in the symmetry finder algorithm if None (
default value), no symmetry check is performed and only the
structure matcher is used. A recommended value is 1e-5.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.RemoveDuplicatesFilter.test">
<span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L193-L217"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveDuplicatesFilter.test" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input structure to test.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>True if structure is not in list.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.RemoveExistingFilter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">RemoveExistingFilter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">existing_structures</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">structure_matcher</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.analysis.html#pymatgen.analysis.structure_matcher.StructureMatcher" title="pymatgen.analysis.structure_matcher.StructureMatcher"><span class="pre">StructureMatcher</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">symprec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L220-L275"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveExistingFilter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures existing in a given list from the transmuter.</p>
<p>Remove existing structures based on the structure matcher
and symmetry (if symprec is given).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>existing_structures</strong> (<em>list</em><em>[</em><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a><em>]</em>) – Existing structures to compare with.</p></li>
<li><p><strong>structure_matcher</strong> (<em>dict</em><em> | </em><a class="reference internal" href="pymatgen.analysis.html#pymatgen.analysis.structure_matcher.StructureMatcher" title="pymatgen.analysis.structure_matcher.StructureMatcher"><em>StructureMatcher</em></a><em>, </em><em>optional</em>) – Will be used for
structure comparison.</p></li>
<li><p><strong>symprec</strong> (<em>float</em><em> | </em><em>None</em>) – The precision in the symmetry finder algorithm.
If None (default value), no symmetry check is performed and only the
structure matcher is used. A recommended value is 1e-5.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.RemoveExistingFilter.as_dict">
<span class="sig-name descname"><span class="pre">as_dict</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L269-L275"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveExistingFilter.as_dict" title="Link to this definition"></a></dt>
<dd><p>Get MSONable dict.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.RemoveExistingFilter.test">
<span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L248-L267"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveExistingFilter.test" title="Link to this definition"></a></dt>
<dd><p>True if structure is not in existing list.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.SpecieProximityFilter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SpecieProximityFilter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">specie_and_min_dist_dict</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L117-L163"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures that have certain species that are too close together.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>specie_and_min_dist_dict</strong> (<em>dict</em>) – A species string to float mapping. For
example, {“Na+”: 1} means that all Na+ ions must be at least 1
Angstrom away from each other. Multiple species criteria can be
applied. Note that the testing is done based on the actual object
. If you have a structure with Element, you must use {“Na”:1}
instead to filter based on Element and not Species.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.SpecieProximityFilter.as_dict">
<span class="sig-name descname"><span class="pre">as_dict</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L146-L152"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter.as_dict" title="Link to this definition"></a></dt>
<dd><p>Get MSONable dict.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.SpecieProximityFilter.from_dict">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dct</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L154-L163"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter.from_dict" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>dct</strong> (<em>dict</em>) – Dict representation.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>SpecieProximityFilter</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.SpecieProximityFilter.test">
<span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L132-L144"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter.test" title="Link to this definition"></a></dt>
<dd><p>True if structure does not contain species within specified distances.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.SpeciesMaxDistFilter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SpeciesMaxDistFilter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sp1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sp2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_dist</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L293-L322"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpeciesMaxDistFilter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures that do have two particular species that are
not nearest neighbors by a predefined max_dist. For instance, if you are
analyzing Li battery materials, you would expect that each Li+ would be
nearest neighbor to lower oxidation state transition metal for
electrostatic reasons. This only works if the structure is oxidation state
decorated, as structures with only elemental sites are automatically
assumed to have net charge of 0.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sp1</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.periodic_table.Species" title="pymatgen.core.periodic_table.Species"><em>Species</em></a>) – First specie</p></li>
<li><p><strong>sp2</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.periodic_table.Species" title="pymatgen.core.periodic_table.Species"><em>Species</em></a>) – Second specie</p></li>
<li><p><strong>max_dist</strong> (<em>float</em>) – Maximum distance between species.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.filters.SpeciesMaxDistFilter.test">
<span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/filters.py#L314-L322"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpeciesMaxDistFilter.test" title="Link to this definition"></a></dt>
<dd><p>True if structure contains the two species but their distance is greater than max_dist.</p>
</dd></dl>

</dd></dl>

</section>
<section id="module-pymatgen.alchemy.materials">
<span id="pymatgen-alchemy-materials-module"></span><h2>pymatgen.alchemy.materials module<a class="headerlink" href="#module-pymatgen.alchemy.materials" title="Link to this heading"></a></h2>
<p>This module provides various representations of transformed structures. A
TransformedStructure is a structure that has been modified by undergoing a
series of transformations.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TransformedStructure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.transformations.html#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><span class="pre">AbstractTransformation</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.transformations.html#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><span class="pre">AbstractTransformation</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">history</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.transformations.html#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><span class="pre">AbstractTransformation</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Mapping</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">other_parameters</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L33-L397"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MSONable</span></code></p>
<p>Container for new structures that include history of transformations.</p>
<p>Each transformed structure is made up of a sequence of structures with
associated transformation history.</p>
<p>Initialize a transformed structure from a structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input structure</p></li>
<li><p><strong>transformations</strong> (<em>list</em><em>[</em><em>Transformation</em><em>]</em>) – Transformations to apply.</p></li>
<li><p><strong>history</strong> (<em>list</em><em>[</em><em>Transformation</em><em>]</em>) – Previous history.</p></li>
<li><p><strong>other_parameters</strong> (<em>dict</em>) – Additional parameters to be added.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.append_filter">
<span class="sig-name descname"><span class="pre">append_filter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure_filter</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><span class="pre">AbstractStructureFilter</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L160-L169"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.append_filter" title="Link to this definition"></a></dt>
<dd><p>Add a filter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure_filter</strong> (<em>StructureFilter</em>) – A filter implementing the
AbstractStructureFilter API. Tells transmuter what structures to retain.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.append_transformation">
<span class="sig-name descname"><span class="pre">append_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transformation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_alternatives</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">clear_redo</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure" title="pymatgen.alchemy.materials.TransformedStructure"><span class="pre">TransformedStructure</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L103-L158"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.append_transformation" title="Link to this definition"></a></dt>
<dd><p>Append a transformation to the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformation</strong> – Transformation to append</p></li>
<li><p><strong>return_alternatives</strong> – Whether to return alternative
TransformedStructures for one-to-many transformations.
return_alternatives can be a number, which stipulates the
total number of structures to return.</p></li>
<li><p><strong>clear_redo</strong> – Boolean indicating whether to clear the redo list.
By default, this is True, meaning any appends clears the
history of undoing. However, when using append_transformation
to do a redo, the redo list should not be cleared to allow
multiple redos.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.as_dict">
<span class="sig-name descname"><span class="pre">as_dict</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L339-L347"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.as_dict" title="Link to this definition"></a></dt>
<dd><p>Dict representation of the TransformedStructure.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.extend_transformations">
<span class="sig-name descname"><span class="pre">extend_transformations</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.transformations.html#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><span class="pre">AbstractTransformation</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_alternatives</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L171-L186"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.extend_transformations" title="Link to this definition"></a></dt>
<dd><p>Extend a sequence of transformations to the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformations</strong> – Sequence of Transformations</p></li>
<li><p><strong>return_alternatives</strong> – Whether to return alternative
TransformedStructures for one-to-many transformations.
return_alternatives can be a number, which stipulates the
total number of structures to return.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.from_cif_str">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_cif_str</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cif_string</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.transformations.html#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><span class="pre">AbstractTransformation</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">primitive</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occupancy_tolerance</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1.0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L266-L310"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_cif_str" title="Link to this definition"></a></dt>
<dd><p>Generate TransformedStructure from a CIF string.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cif_string</strong> (<em>str</em>) – Input CIF string. Should contain only one
structure. For CIFs containing multiple structures, please use
CifTransmuter.</p></li>
<li><p><strong>transformations</strong> (<em>list</em><em>[</em><em>Transformation</em><em>]</em>) – Sequence of transformations
to be applied to the input structure.</p></li>
<li><p><strong>primitive</strong> (<em>bool</em>) – Option to set if the primitive cell should be
extracted. Defaults to True. However, there are certain
instances where you might want to use a non-primitive cell,
e.g. if you are trying to generate all possible orderings of
partial removals or order a disordered structure. Defaults to True.</p></li>
<li><p><strong>occupancy_tolerance</strong> (<em>float</em>) – If total occupancy of a site is
between 1 and occupancy_tolerance, the occupancies will be
scaled down to 1.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>TransformedStructure</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.from_dict">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dct</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L349-L353"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_dict" title="Link to this definition"></a></dt>
<dd><p>Create a TransformedStructure from a dict.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.from_poscar_str">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_poscar_str</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">poscar_string</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.transformations.html#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><span class="pre">AbstractTransformation</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L312-L337"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_poscar_str" title="Link to this definition"></a></dt>
<dd><p>Generate TransformedStructure from a poscar string.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>poscar_string</strong> (<em>str</em>) – Input POSCAR string.</p></li>
<li><p><strong>transformations</strong> (<em>list</em><em>[</em><em>Transformation</em><em>]</em>) – Sequence of transformations
to be applied to the input structure.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.from_snl">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_snl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">snl</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.util.html#pymatgen.util.provenance.StructureNL" title="pymatgen.util.provenance.StructureNL"><span class="pre">StructureNL</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L382-L397"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_snl" title="Link to this definition"></a></dt>
<dd><p>Create TransformedStructure from SNL.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>snl</strong> (<a class="reference internal" href="pymatgen.util.html#pymatgen.util.provenance.StructureNL" title="pymatgen.util.provenance.StructureNL"><em>StructureNL</em></a>) – Starting snl</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>TransformedStructure</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.get_vasp_input">
<span class="sig-name descname"><span class="pre">get_vasp_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vasp_input_set:</span> <span class="pre">type[VaspInputSet]</span> <span class="pre">=</span> <span class="pre">&lt;class</span> <span class="pre">'pymatgen.io.vasp.sets.MPRelaxSet'&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">**kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L188-L198"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.get_vasp_input" title="Link to this definition"></a></dt>
<dd><p>Get VASP input as a dict of VASP objects.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>vasp_input_set</strong> (<a class="reference internal" href="pymatgen.io.vasp.html#pymatgen.io.vasp.sets.VaspInputSet" title="pymatgen.io.vasp.sets.VaspInputSet"><em>VaspInputSet</em></a>) – input set
to create VASP input files from structures</p></li>
<li><p><strong>**kwargs</strong> – All keyword args supported by the VASP input set.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.redo_next_change">
<span class="sig-name descname"><span class="pre">redo_next_change</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L83-L93"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.redo_next_change" title="Link to this definition"></a></dt>
<dd><p>Redo the last undone change in the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>IndexError</strong> – If already at the latest change.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.set_parameter">
<span class="sig-name descname"><span class="pre">set_parameter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Any</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure" title="pymatgen.alchemy.materials.TransformedStructure"><span class="pre">TransformedStructure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L235-L247"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.set_parameter" title="Link to this definition"></a></dt>
<dd><p>Set a parameter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>str</em>) – The string key.</p></li>
<li><p><strong>value</strong> (<em>Any</em>) – The value.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>TransformedStructure</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.structures">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">structures</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/alchemy/materials.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.structures" title="Link to this definition"></a></dt>
<dd><p>Copy of all structures in the TransformedStructure. A
structure is stored after every single transformation.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.to_snl">
<span class="sig-name descname"><span class="pre">to_snl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">authors</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.util.html#pymatgen.util.provenance.StructureNL" title="pymatgen.util.provenance.StructureNL"><span class="pre">StructureNL</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L355-L380"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.to_snl" title="Link to this definition"></a></dt>
<dd><p>Generate a StructureNL from TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>authors</strong> (<em>List</em><em>[</em><em>str</em><em>]</em>) – Authors contributing to the generated StructureNL.</p></li>
<li><p><strong>**kwargs</strong> (<em>Any</em>) – All kwargs supported by StructureNL.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The generated StructureNL object.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.util.html#pymatgen.util.provenance.StructureNL" title="pymatgen.util.provenance.StructureNL">StructureNL</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.undo_last_change">
<span class="sig-name descname"><span class="pre">undo_last_change</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L66-L81"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.undo_last_change" title="Link to this definition"></a></dt>
<dd><p>Undo the last change in the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>IndexError</strong> – If already at the oldest change.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.was_modified">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">was_modified</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/alchemy/materials.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.was_modified" title="Link to this definition"></a></dt>
<dd><p>Boolean describing whether the last transformation on the structure
made any alterations to it one example of when this would return false
is in the case of performing a substitution transformation on the
structure when the specie to replace isn’t in the structure.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.materials.TransformedStructure.write_vasp_input">
<span class="sig-name descname"><span class="pre">write_vasp_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vasp_input_set:</span> <span class="pre">type[~pymatgen.io.vasp.sets.VaspInputSet]</span> <span class="pre">=</span> <span class="pre">&lt;class</span> <span class="pre">'pymatgen.io.vasp.sets.MPRelaxSet'&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output_dir:</span> <span class="pre">str</span> <span class="pre">=</span> <span class="pre">'.'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">create_directory:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">**kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/materials.py#L200-L219"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.write_vasp_input" title="Link to this definition"></a></dt>
<dd><p>Write VASP input to an output_dir.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>vasp_input_set</strong> – pymatgen.io.vasp.sets.VaspInputSet like object that creates vasp input files from
structures.</p></li>
<li><p><strong>output_dir</strong> – Directory to output files</p></li>
<li><p><strong>create_directory</strong> – Create the directory if not present. Defaults to
True.</p></li>
<li><p><strong>**kwargs</strong> – All keyword args supported by the VASP input set.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="module-pymatgen.alchemy.transmuters">
<span id="pymatgen-alchemy-transmuters-module"></span><h2>pymatgen.alchemy.transmuters module<a class="headerlink" href="#module-pymatgen.alchemy.transmuters" title="Link to this heading"></a></h2>
<p>This module implements various transmuter classes.
Transmuters are essentially classes that generate TransformedStructures from
various data sources. They enable the high-throughput generation of new
structures and input files.</p>
<p>It also includes the helper function, batch_write_vasp_input to generate an
entire directory of vasp input files for running.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.CifTransmuter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CifTransmuter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cif_string</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">primitive</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extend_collection</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L229-L282"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.CifTransmuter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter" title="pymatgen.alchemy.transmuters.StandardTransmuter"><code class="xref py py-class docutils literal notranslate"><span class="pre">StandardTransmuter</span></code></a></p>
<p>Generate a Transmuter from a CIF string, possibly containing multiple structures.</p>
<p>Generate a Transmuter from a CIF string, possibly
containing multiple structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cif_string</strong> – A string containing a CIF or a series of CIFs</p></li>
<li><p><strong>transformations</strong> – New transformations to be applied to all
structures</p></li>
<li><p><strong>primitive</strong> – Whether to generate the primitive cell from the CIF.</p></li>
<li><p><strong>extend_collection</strong> – Whether to use more than one output structure
from one-to-many transformations. extend_collection can be a
number, which determines the maximum branching for each
transformation.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.CifTransmuter.from_filenames">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_filenames</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filenames</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">primitive</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extend_collection</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L261-L282"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.CifTransmuter.from_filenames" title="Link to this definition"></a></dt>
<dd><p>Generate a TransformedStructureCollection from a cif, possibly
containing multiple structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filenames</strong> (<em>list</em><em>[</em><em>str</em><em>]</em>) – The CIF file paths.</p></li>
<li><p><strong>transformations</strong> – New transformations to be applied to all
structures</p></li>
<li><p><strong>primitive</strong> – Same meaning as in __init__.</p></li>
<li><p><strong>extend_collection</strong> – Same meaning as in __init__.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.PoscarTransmuter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">PoscarTransmuter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">poscar_string</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extend_collection</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L285-L316"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.PoscarTransmuter" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter" title="pymatgen.alchemy.transmuters.StandardTransmuter"><code class="xref py py-class docutils literal notranslate"><span class="pre">StandardTransmuter</span></code></a></p>
<p>Generate a transmuter from a sequence of POSCARs.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>poscar_string</strong> (<em>list</em><em>[</em><em>str</em><em>]</em>) – POSCAR strings.</p></li>
<li><p><strong>transformations</strong> – New transformations to be applied to all
structures.</p></li>
<li><p><strong>extend_collection</strong> – Whether to use more than one output structure
from one-to-many transformations.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.PoscarTransmuter.from_filenames">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_filenames</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">poscar_filenames</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extend_collection</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#pymatgen.alchemy.transmuters.StandardTransmuter" title="pymatgen.alchemy.transmuters.StandardTransmuter"><span class="pre">StandardTransmuter</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L300-L316"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.PoscarTransmuter.from_filenames" title="Link to this definition"></a></dt>
<dd><p>Convenient constructor to generates a POSCAR transmuter from a list of
POSCAR filenames.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>poscar_filenames</strong> (<em>list</em><em>[</em><em>str</em><em>]</em>) – The POSCAR file paths.</p></li>
<li><p><strong>transformations</strong> – New transformations to be applied to all
structures.</p></li>
<li><p><strong>extend_collection</strong> – Same meaning as in __init__.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">StandardTransmuter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transformed_structures</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure" title="pymatgen.alchemy.materials.TransformedStructure"><span class="pre">TransformedStructure</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extend_collection</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ncores</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L35-L226"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>An example of a Transmuter object, which performs a sequence of
transformations on many structures to generate TransformedStructures.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.transformed_structures">
<span class="sig-name descname"><span class="pre">transformed_structures</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/alchemy/transmuters.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.transformed_structures" title="Link to this definition"></a></dt>
<dd><p>All transformed structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a>]</p>
</dd>
</dl>
</dd></dl>

<p>Initialize a transmuter from an initial list of
pymatgen.alchemy.materials.TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformed_structures</strong> (<em>[</em><a class="reference internal" href="#pymatgen.alchemy.materials.TransformedStructure" title="pymatgen.alchemy.materials.TransformedStructure"><em>TransformedStructure</em></a><em>]</em>) – Input transformed
structures</p></li>
<li><p><strong>transformations</strong> (<em>[</em><em>Transformations</em><em>]</em>) – New transformations to be
applied to all structures.</p></li>
<li><p><strong>extend_collection</strong> (<em>int</em>) – Whether to use more than one output
structure from one-to-many transformations. extend_collection
can be an int, which determines the maximum branching for each
transformation.</p></li>
<li><p><strong>ncores</strong> (<em>int</em>) – Number of cores to use for applying transformations.
Uses multiprocessing.Pool. Default is None, which implies
serial.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.add_tags">
<span class="sig-name descname"><span class="pre">add_tags</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tags</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L185-L192"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.add_tags" title="Link to this definition"></a></dt>
<dd><p>Add tags for the structures generated by the transmuter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>tags</strong> – A sequence of tags. Note that this should be a sequence of
strings, e.g. [“My awesome structures”, “Project X”].</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.append_transformation">
<span class="sig-name descname"><span class="pre">append_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transformation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extend_collection</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">clear_redo</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L104-L138"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.append_transformation" title="Link to this definition"></a></dt>
<dd><p>Append a transformation to all TransformedStructures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformation</strong> – Transformation to append</p></li>
<li><p><strong>extend_collection</strong> – Whether to use more than one output structure
from one-to-many transformations. extend_collection can be a
number, which determines the maximum branching for each transformation.</p></li>
<li><p><strong>clear_redo</strong> (<em>bool</em>) – Whether to clear the redo list. By default,
this is True, meaning any appends clears the history of
undoing. However, when using append_transformation to do a
redo, the redo list should not be cleared to allow multiple redos.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><dl class="simple">
<dt>Each list item is True if the transformation altered the structure</dt><dd><p>with the corresponding index.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[bool]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.append_transformed_structures">
<span class="sig-name descname"><span class="pre">append_transformed_structures</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">trafo_structs_or_transmuter</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L194-L206"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.append_transformed_structures" title="Link to this definition"></a></dt>
<dd><p>Overloaded to accept either a list of transformed structures
or transmuter, it which case it appends the second transmuter’s structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>trafo_structs_or_transmuter</strong> – A list of transformed structures or a transmuter.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.apply_filter">
<span class="sig-name descname"><span class="pre">apply_filter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure_filter</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><span class="pre">AbstractStructureFilter</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L149-L163"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.apply_filter" title="Link to this definition"></a></dt>
<dd><p>Apply a structure_filter to the list of TransformedStructures
in the transmuter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure_filter</strong> – StructureFilter to apply.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.extend_transformations">
<span class="sig-name descname"><span class="pre">extend_transformations</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transformations</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L140-L147"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.extend_transformations" title="Link to this definition"></a></dt>
<dd><p>Extend a sequence of transformations to the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>transformations</strong> – Sequence of Transformations</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.from_structures">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_structures</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structures</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformations</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extend_collection</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L208-L226"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.from_structures" title="Link to this definition"></a></dt>
<dd><p>Alternative constructor from structures rather than
TransformedStructures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structures</strong> – Sequence of structures</p></li>
<li><p><strong>transformations</strong> – New transformations to be applied to all
structures</p></li>
<li><p><strong>extend_collection</strong> – Whether to use more than one output structure
from one-to-many transformations. extend_collection can be a
number, which determines the maximum branching for each
transformation.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>StandardTransmuter</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.redo_next_change">
<span class="sig-name descname"><span class="pre">redo_next_change</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L95-L102"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.redo_next_change" title="Link to this definition"></a></dt>
<dd><p>Redo the last undone transformation in the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>IndexError if already at the latest change.</strong> – </p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.set_parameter">
<span class="sig-name descname"><span class="pre">set_parameter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L174-L183"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.set_parameter" title="Link to this definition"></a></dt>
<dd><p>Add parameters to the transmuter. Additional parameters are stored in
the as_dict() output.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> – The key for the parameter.</p></li>
<li><p><strong>value</strong> – The value for the parameter.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.undo_last_change">
<span class="sig-name descname"><span class="pre">undo_last_change</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L86-L93"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.undo_last_change" title="Link to this definition"></a></dt>
<dd><p>Undo the last transformation in the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>IndexError if already at the oldest change.</strong> – </p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.StandardTransmuter.write_vasp_input">
<span class="sig-name descname"><span class="pre">write_vasp_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L165-L172"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.StandardTransmuter.write_vasp_input" title="Link to this definition"></a></dt>
<dd><p>Batch write vasp input for a sequence of transformed structures to
output_dir, following the format output_dir/{formula}_{number}.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>kwargs</strong> – All kwargs supported by batch_write_vasp_input.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.alchemy.transmuters.batch_write_vasp_input">
<span class="sig-name descname"><span class="pre">batch_write_vasp_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">transformed_structures:</span> <span class="pre">Sequence[TransformedStructure],</span> <span class="pre">vasp_input_set:</span> <span class="pre">type[VaspInputSet]</span> <span class="pre">=</span> <span class="pre">&lt;class</span> <span class="pre">'pymatgen.io.vasp.sets.MPRelaxSet'&gt;,</span> <span class="pre">output_dir:</span> <span class="pre">str</span> <span class="pre">=</span> <span class="pre">'.',</span> <span class="pre">create_directory:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">True,</span> <span class="pre">subfolder:</span> <span class="pre">Callable[[TransformedStructure],</span> <span class="pre">str]</span> <span class="pre">|</span> <span class="pre">None</span> <span class="pre">=</span> <span class="pre">None,</span> <span class="pre">include_cif:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">False,</span> <span class="pre">**kwargs</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../alchemy/transmuters.py#L319-L356"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.alchemy.transmuters.batch_write_vasp_input" title="Link to this definition"></a></dt>
<dd><p>Batch write vasp input for a sequence of transformed structures to
output_dir, following the format output_dir/{group}/{formula}_{number}.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformed_structures</strong> – Sequence of TransformedStructures.</p></li>
<li><p><strong>vasp_input_set</strong> – pymatgen.io.vasp.sets.VaspInputSet to creates
vasp input files from structures.</p></li>
<li><p><strong>output_dir</strong> – Directory to output files</p></li>
<li><p><strong>create_directory</strong> (<em>bool</em>) – Create the directory if not present.
Defaults to True.</p></li>
<li><p><strong>subfolder</strong> – Function to create subdirectory name from transformed_structure.
E.g. lambda x: x.other_parameters[“tags”][0] to use the first tag.</p></li>
<li><p><strong>include_cif</strong> (<em>bool</em>) – Pass True to output a CIF as well. CIF files are generally
better supported in visualization programs.</p></li>
<li><p><strong>**kwargs</strong> – Any kwargs supported by vasp_input_set.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</section>
</section>


           </div>
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2011, Pymatgen Development Team.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>
